package com.sanyu.controller.repairman;

import com.sanyu.pojo.dto.RepairmanDTO;
import com.sanyu.pojo.dto.RepairmanLoginDTO;
import com.sanyu.pojo.dto.UpdatePasswordDTO;
import com.sanyu.pojo.vo.MessageVO;
import com.sanyu.pojo.vo.RepairmanLoginVO;
import com.sanyu.pojo.vo.RepairmanVO;
import com.sanyu.pojo.vo.UserVO;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/repairman/repairman")
@Api("维修APP/用户相关接口")
public class RepairmanController {

    @PostMapping("/login")
    @ApiOperation("维修/运维人员登录")
    public Result login(@RequestBody RepairmanLoginDTO repairmanLoginDTO){
        RepairmanLoginVO repairmanLoginVO = new RepairmanLoginVO();
        return Result.success(repairmanLoginVO);
    }

    @PutMapping
    @ApiOperation("修改用户信息")
    public Result update(@RequestBody RepairmanDTO repairmanDTO){
        return Result.success();
    }

    @PutMapping("/password")
    @ApiOperation("修改密码")
    public Result updatePwd(@RequestBody UpdatePasswordDTO updatePasswordDTO){
        return Result.success();
    }

    @GetMapping
    @ApiOperation("查询当前维修人员用户信息")
    public Result<RepairmanVO> detail(){
        return Result.success(new RepairmanVO());
    }
}
